<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>CRUD COMPRAS</title>
    </h:head>
    <h:body>
  <h:form>

      
      
<br/>


<br/>
<h:outputText value="nome do cliente"/>
<h:inputText id="nome_cliente"
             value="#{compraController.objCompra.nome_cliente}"/>
<br/>

<h:outputText value="Produto"/>
<h:inputText id="produto"
             value="#{compraController.objCompra.produto}"/>
<br/>


Tipo cliente:
<h:selectOneMenu id="tipo_cliente" 
                 value="#{compraController.objCompra.tipo_cliente}" 
                 title="Unidade Produto">
    <f:selectItem itemLabel="Fisica" itemValue="1"/>
    <f:selectItem itemLabel="Juridica" itemValue="2"/>
    </h:selectOneMenu>



<br/>

<h:outputText value="Vlr. Unitário"/>
<h:inputText id="valor_unitario"
             value="#{compraController.objCompra.valor_unitario}"/>
<br/>


<h:outputText value="Quantidade"/>
<h:inputText id="quantidade"
             value="#{compraController.objCompra.quantidade}"/>
<br/>



<h:commandButton id="btnsalvar" value="Salvar"
                 action="#{compraController.salvar()}"/>
<br/>
<h:commandButton id="btnlimpar" value="Limpar" type="reset"/>
<br/>
<h:commandButton id="btncancel" value="Cancelar" 
                 immediate="true" action="/mostrarCompra"/>
<br/>
</h:form>
    </h:body>
</html>

